/**商品管理接口模块 */
import axios from "../utils/request";

// 分页获取商品数据
export const getGoodsList = (page, size) => axios({
    url: "/api/goodslist",
    params: { page, size }
})
//获取商品总数
export const getAllGoodsList = () => axios({
    url: "/api/goodslist",
})
// 获取商品总数量
export const getGoodsTotal = () => axios({
    url: "/api/goodscount"
})
// 增加商品
export const addGoods = (goodsForm) => axios({
    url: "/api/goodsadd",
    method: "POST",
    data: goodsForm
})
// 删除商品
export const delGoods = (id) => axios({
    url: '/api/goodsdelete',
    method: "POST",
    data: { id }
})
// 编辑商品
export const editGoods = (goodsForm) => axios({
    url: "/api/goodsedit",
    method: "POST",
    data: goodsForm
})